package com.pug.security.vo;

import com.pug.security.po.SysUser;
import lombok.Builder;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Set;

/**
 * @author RenGaoshuai
 * @date 2023/7/17 9:13
 * @description 自定义的用户信息存储对象
 */
@Data
public class UserDetailVO implements UserDetails , Serializable {
    // 这个业务的用户信息
    private SysUser sysUser;
    // 授权用户信息
    private String password;
    private  String username ;
    private Set<GrantedAuthority> authorities;
    private  boolean accountNonExpired = true;
    private  boolean accountNonLocked= true;
    private  boolean credentialsNonExpired= true;
    private  boolean enabled= true;
}
